package cn.yili12.server.info.handler;

import cn.yili12.server.client.handler.BaseClientHandler;
import cn.yili12.server.client.vo.ClientMessage;
import cn.yili12.server.info.vo.InfoMessage;
import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class InputInfoHandler extends BaseInfoHandler {


    @Override
    public boolean handler(InfoMessage message) {
        //找到客户端发送消息
        webSocketChannelPool.sendTo(message.getTo(), JSON.toJSONString(message));
        return true;
    }
}
